package com.napier.unit3;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Vibrator;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class vibrate extends Activity implements OnClickListener {
	
	private Vibrator vibrator;
	Button button1;
	
    @Override
    public void onCreate(Bundle savedInstanceState) 
    {
        super.onCreate(savedInstanceState);
        
        setContentView(R.layout.main);

        vibrator = (Vibrator)getSystemService(Context.VIBRATOR_SERVICE);
        button1 = (Button) findViewById(R.id.button1);
        button1.setOnClickListener(this);
    }
    
    public void onClick(View view) {
    	vibrator.vibrate(500);
    	
    }
}